package 富婆梦.第一阶段.第三周.练习题;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class GameHelper1 {
    public String getUserInput(String prompt){
        String input = null;
        System.out.println(prompt + " ");
        try {
            BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
            input = is.readLine();
            if (input.length() == 0){
                return null;
            }
        }catch (IOException e){
            System.out.println("IOException："+e);
        }
        return input;
    }
}
